package cn.edu.seu.ssny.service;


import cn.edu.seu.ssny.entity.*;
import cn.edu.seu.ssny.service.support.IBaseService;

import java.util.Date;
import java.util.List;
import java.util.Optional;

public interface IEquipmentService extends IBaseService<Equipment, Integer> {

    Optional<Equipment> findByName(String name);

    List<Equipment> findByProject(Project project);

    List<Equipment> findEquipmentsByProjectId(Integer projectId);

    List<Equipment> findByEnterprise(Enterprise enterprise);

    void saveOrUpdate(Equipment equipment, Enterprise enterprise, Project project, EquipmentType type);

    void saveCoordinate(Equipment equipment);

    void setMaintainTime(Equipment equipment);

    void maintain(Integer equipmentId);

    Device getEquipmentDeviceByType(Equipment equipment, String deviceType);

    List<Equipment> findBySysClassId(Long sysClassId);
}

